package com.opennetexam.manager.controller;

import com.opennetexam.manager.bussinessservice.WANExamBusinessService;
import com.opennetexam.manager.common.CommonFunction;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletResponse;
import java.util.Map;

/**
 * @Description 网考管理端登录
 * @author 奶茶
 * Created by on 2019/3/12 15:28.
 */
@RestController
@RequestMapping("/Manager")
public class WANExamManagerLoginController {

    @Autowired
    private WANExamBusinessService wanExamBusinessService;

    /**
     * 网考管理端登录
     * @param parameter
     * @param response
     */
    @RequestMapping(value = "/Login",method = RequestMethod.POST)
    public void login(@RequestBody Map<String,Object> parameter, HttpServletResponse response){
        CommonFunction.responseWrite(response,wanExamBusinessService.examAdminUserLogin(parameter.get("account").toString(), parameter.get("password").toString()));
    }

}
